﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Search.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
<form id="defaultPage" runat="server" action="SearchResults.aspx" method="get"> 

        <asp:TextBox ID="txtISBN" runat="server" Style="z-index: 100; left: 139px; position: absolute;
            top: 77px"></asp:TextBox>
        <asp:TextBox ID="txtTitle" runat="server" Style="z-index: 101; left: 137px; position: absolute;
            top: 159px"></asp:TextBox>
        <asp:TextBox ID="txtAuthor" runat="server" Style="z-index: 102; left: 137px; position: absolute;
            top: 207px"></asp:TextBox>

        <!-- What to pass to the hidden textbox so the correct search runs !
         "ISBN" || "T" || "A" | "TA" -->
        <asp:HiddenField ID="txtSearchType" runat="server" Value="t" />
    &nbsp;

        <!-- Labels -->
        <asp:Label ID="lblTitle" runat="server" Style="z-index: 103; left: 58px; position: absolute;
            top: 159px" Text="Title:" Width="42px"></asp:Label>
        <asp:Label ID="lblAuthor" runat="server" Style="z-index: 104; left: 58px; position: absolute;
            top: 207px" Text="Author:" Width="51px"></asp:Label>
        <asp:Label ID="lblISBN" runat="server" Style="z-index: 105; left: 60px; position: absolute;
            top: 77px" Text="ISBN:" Width="46px"></asp:Label>
    &nbsp; &nbsp;&nbsp;
        
        <!-- OR -->    
        <asp:Label ID="Label2" runat="server" Style="z-index: 107; left: 61px;  position: absolute;
            top: 117px" Text="<b>Or: </b>"></asp:Label>

        <!-- Submit Button -->
        <asp:Button ID="newbutton" runat="server"  OnClick="newbutton_Click" Style="z-index: 108;
         left: 58px; width:65px; position: absolute; top: 259px" Text="Search"  />
    &nbsp;<!-- Test Button -->
        
    <asp:CustomValidator ID="AllFieldCustValidator" runat="server" ControlToValidate="txtISBN"
        ErrorMessage="AllFieldCustValidator" OnServerValidate="IsbnLengthValidator_ServerValidate"
        Style="z-index: 110; left: 150px; position: absolute; top: 260px" ValidateEmptyText="True"></asp:CustomValidator>
        
</form>
</body>
</html>
